package com.azusa.xbiao.entity;

/**
 * 响应状态码
 */
public enum  StatusCode {

    //成功
    SUCCESS(200,"成功",true),

    //用户名或密码错误
    USER_PASSWORD_ERROR(201,"用户名或密码错误",false),

    //没有验证码信息
    NO_CODE(301,"验证码信息有误",false),

    //权限不足
    ACCESS_ERROR(300,"权限不够",false),

    //失败
    ERROR(400,"异常错误",false),

    //远程调用失败
    REMOTE_ERROR(404,"远程调用失败",false),

    //重复操作
    REPEAT_ERROR(500,"重复操作",false)

    ;

    //状态码
    private Integer code;
    //提示语
    private String msg;
    //处理结果状态   true为成功，false处理失败
    private boolean success;

    StatusCode() {
    }

    StatusCode(Integer code, String msg, boolean success) {
        this.code = code;
        this.msg = msg;
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }


    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean getSuccess() {
        return success;
    }

}
